package com.sicheng.metadata.juc.线程通信.lock;

public class ShareApp {
    public static void main(String[] args) {
        Share lockShare = new Share();
        new Thread(()->{
            for (int i = 0; i < 10; i++) {
                lockShare.incr();
            }
        }, "AA").start();
        new Thread(()->{
            for (int i = 0; i < 10; i++) {
                lockShare.decr();
            }
        }, "BB").start();
    }


}
